package club.banyuan.lambda.demo;


import org.w3c.dom.ls.LSOutput;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;

/**
 * @author edz
 * @version 1.0
 * @date 2020/12/4 上午9:22
 */
public class StreamAPI {
    public static void main(String[] args) {
    List<String> list=new ArrayList();
    list.add("123");
    list.add("21312");
    list.add("1");
    list.add("12223");
    list.add("82423");
        Stream<String> stream=list.stream();
        stream.forEach(System.out::println);
        System.out.println("----------");


        Stream<String> parallelStream = list.parallelStream();
        parallelStream.forEach(System.out::println);

        System.out.println("==========");
        Stream<String> stream1=list.stream();//串行
//        stream1.forEach((x-> System.out.println(x)));
        stream1.forEach(System.out::println);//中间操作

//        Stream<String> stream2=list.stream();
//        stream2.filter(
//                string->(Integer.parseInt(string)>12223)
//        );








    }


}
